package cn.glinks.liuhe.api.jsonbean;

import java.util.List;

public class ParksInfo {

    /**
     * parkSum : 2
     * parks : [{"parkName":"北京","parkLevel":1,"nameAlign":1,"lat":41.796767,"lng":123.429096,"pop":5000,"testPop":3787,"l1":[1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400],"l2":[1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400],"l3":[1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400],"l4":[1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400],"l5":[1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400,1400]}]
     */

    private int parkSum;
    private List<ParksBean> parks;

    public int getParkSum() {
        return parkSum;
    }

    public void setParkSum(int parkSum) {
        this.parkSum = parkSum;
    }

    public List<ParksBean> getParks() {
        return parks;
    }

    public void setParks(List<ParksBean> parks) {
        this.parks = parks;
    }

    public static class ParksBean {
        /**
         * parkName : 深圳龙华园区
         * parkLevel : 3
         * nameAlign : 1
         * lat : 22.648489
         * lng : 114.046333
         * pop : 29552
         * testPop : 28037
         * l1 : [45,55,518,604,608,593,563,193,721,630,507,416]
         * l2 : [29,487,722,564,583,469,60,659,594,779,304,189]
         * l3 : [500,208,270,757,822,884,482,595,845,541,454,187]
         * l4 : [885,667,574,801,410,174,379,314,890,696,488,398]
         * l5 : [813,252,527,186,447,716,107,36,119,287,352,82]
         */

        private String parkName;
        private int parkLevel;
        private int nameAlign;
        private String lat;
        private String lng;
        private int pop;
        private int testPop;
        private List<Integer> l1;
        private List<Integer> l2;
        private List<Integer> l3;
        private List<Integer> l4;
        private List<Integer> l5;

        public String getParkName() {
            return parkName;
        }

        public void setParkName(String parkName) {
            this.parkName = parkName;
        }

        public int getParkLevel() {
            return parkLevel;
        }

        public void setParkLevel(int parkLevel) {
            this.parkLevel = parkLevel;
        }

        public int getNameAlign() {
            return nameAlign;
        }

        public void setNameAlign(int nameAlign) {
            this.nameAlign = nameAlign;
        }

        public String getLat() {
            return lat;
        }

        public void setLat(String lat) {
            this.lat = lat;
        }

        public String getLng() {
            return lng;
        }

        public void setLng(String lng) {
            this.lng = lng;
        }

        public int getPop() {
            return pop;
        }

        public void setPop(int pop) {
            this.pop = pop;
        }

        public int getTestPop() {
            return testPop;
        }

        public void setTestPop(int testPop) {
            this.testPop = testPop;
        }

        public List<Integer> getL1() {
            return l1;
        }

        public void setL1(List<Integer> l1) {
            this.l1 = l1;
        }

        public List<Integer> getL2() {
            return l2;
        }

        public void setL2(List<Integer> l2) {
            this.l2 = l2;
        }

        public List<Integer> getL3() {
            return l3;
        }

        public void setL3(List<Integer> l3) {
            this.l3 = l3;
        }

        public List<Integer> getL4() {
            return l4;
        }

        public void setL4(List<Integer> l4) {
            this.l4 = l4;
        }

        public List<Integer> getL5() {
            return l5;
        }

        public void setL5(List<Integer> l5) {
            this.l5 = l5;
        }

        public int getL1Sum() {
            int sum = 0;
            for (int i = 0; i < l1.size(); i++) {
                sum += l1.get(i);
            }
            return sum;
        }

        public int getL2Sum() {
            int sum = 0;
            for (int i = 0; i < l2.size(); i++) {
                sum += l2.get(i);
            }
            return sum;
        }

        public int getL3Sum() {
            int sum = 0;
            for (int i = 0; i < l3.size(); i++) {
                sum += l3.get(i);
            }
            return sum;
        }

        public int getL4Sum() {
            int sum = 0;
            for (int i = 0; i < l4.size(); i++) {
                sum += l4.get(i);
            }
            return sum;
        }

        public int getL5Sum() {
            int sum = 0;
            for (int i = 0; i < l5.size(); i++) {
                sum += l5.get(i);
            }
            return sum;
        }

        public int getTestSum() {
            int sum = getL1Sum() + getL2Sum()
                    + getL3Sum() + getL4Sum() + getL5Sum();

            return sum;
        }
    }
}
